#ifndef OPERATIONS_H
#define OPERATIONS_H

#include "../Basic/Basic.h"
#include "Interface.h"
#include "Set.h"

namespace Lyt
{
	namespace Collection
	{
		class CollectionOperation : private UnCopyable
		{
		public:
			template<typename _Type>
			static void Copy(ICollection<_Type>& Dstination, const IReadOnlyCollection<_Type>& Source)
			{
				Dstination.Clear();
				AutoPtr<IIterator<_Type>> Iterator=Source.CreateIterator();
				for (Iterator->First(); !Iterator->IsDone(); Iterator->MoveNext())
					Dstination.Add(Iterator->CurrentItem());
			}
		};
	}
}

#endif